﻿using ManifestManaged.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace ManifestManaged.Views
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class SumWindow : Window
    {
        public SumViewModel sumViewModel { get; set; }

        public SumWindow()
        {
            this.Loaded += SumWindow_Loaded;
            sumViewModel = new SumViewModel();

            DataContext = sumViewModel;

            InitializeComponent();
        }

        void SumWindow_Loaded(object sender, RoutedEventArgs e)
        {
            sumViewModel.Setup();
        }

        
        private void ButtonSum_Click(object sender, RoutedEventArgs e)
        {
            sumViewModel.Sum();
        }

        private void ButtonSumAsync_Click(object sender, RoutedEventArgs e)
        {
            sumViewModel.SumAsync();
        }

    }
}
